{extend name="base" /}


{block name="main"}
{php}
$empty = "<tr><td colspan='99'>no data</td></tr>";
{/php}
<div class="container">
    <div class="row">
        <div class="col-md-12">
            <table class="table table-bordered">
                <thead>
                <tr>
                    <th scope="col">first name</th>
                    <th scope="col">last name</th>
                    <th scope="col">email</th>
                    <th scope="col">gender</th>
                    <th scope="col">country</th>
                    <th scope="col">birthday</th>
                    <th scope="col">status</th>
                    <th scope="col">Edit</th>
                    <th scope="col">Action</th>
                </tr>
                </thead>
                <tbody>
                {volist name="list" id="vo" empty="$empty"}
                <tr>
                    <td>{$vo.first_name}</td>
                    <td>{$vo.last_name}</td>
                    <td>{$vo.email}</td>
                    <td>{$vo.gender_text}</td>
                    <td>{$vo.country}</td>
                    <td>{$vo.birthday}</td>
                    <td>{$vo.status_text}</td>
                    <td>
                        <a href="{:url('admin/upUser',['id'=>$vo.id])}" class="btn btn-sm btn-success">edit</a>
                    </td>
                    <td>
                        <a href="{:url('admin/updateUser',['id'=>$vo.id,'action'=>'ban'])}" class="btn btn-sm btn-secondary">ban</a>
                        <a href="{:url('admin/updateUser',['id'=>$vo.id,'action'=>'rec'])}" class="btn btn-sm btn-success">recover</a>
                        <a href="{:url('admin/updateUser',['id'=>$vo.id,'action'=>'del'])}" class="btn btn-sm btn-danger">delete</a>
                    </td>
                </tr>
                {/volist}
                </tbody>
            </table>
        </div>
    </div>
</div>

{/block}